package metier.server;

import java.rmi.registry.LocateRegistry;
import java.rmi.registry.Registry;

public class ServeurMetier {
	
	private static Registry registry;
	
	
	/**
	 * @param args
	 */
	public static void main(String[] args) {
		try {
			
			/* creer registry */
			registry = LocateRegistry.createRegistry(2000);

			String uri = "rmi://localhost:2000/";
			
			/* bind objets metier */
			registry.rebind(uri+"Produits", new MetierProduits());
			registry.rebind(uri+"Historique", new MetierHistorique());
			registry.rebind(uri+"Panier", new MetierPanier());
			registry.rebind(uri+"Connexion", new MetierConnexion());		
		

		} catch (Exception e) {
			System.out.println(e.toString());
			e.printStackTrace();
		}

	}

}
